#include <stdio.h>

void main()
{
    int level[]={1000000,600000,400000,200000,100000,0};
    float ratio[]={0.01,0.015,0.03,0.05,0.075,0.1};
    
    float reward=0;
    int in;
    int j;
    
    //while(1)
    //{
       printf("Please input num: \n");
    	 scanf("%d",&in);
    	 printf("in=%d\n",in);
    	 if(in < 0) 
    	 {
    	     printf("Error: input num<0!\n");
    	     return;
    	 }
    	 
    	 for(j=0;j<6;j++)
    	 {
    	 	  // printf("level=%d ratio=%f\n",level[j],ratio[j]);
    	     if (in>level[j])
    	     	  reward += (in-level[j]) * ratio[j];
    	 }    	  
       printf("reward=%f\n",reward);
       
    //}
    
}